<template>
  <div></div>
</template>

<script setup lang="ts">
/**
 * 组件的生命周期:调用特定的函数--子先执行再执行父
 * 1.创建
 * 2.挂载
 * 3.更新
 * 4.销毁
 * */
/**vue2---生命周期传入方法:比如mounted(){}
 * 创建
 * 1.beforeCreate
 * 2.created

 * 
 * 挂载
 * 3.beforeMount
 * 4.mounted
 * 
 * 更新
 * 5.beforeUpdate
 * 6.updated
 * 
 * 销毁
 * 7.beforeDestroy
 * 8.destroyed        
 * */
/**vue3----生命周期传入箭头函数:比如onMount(()=>{})
 * 创建
 * 1.setup
 *
 * 挂载
 * 2.onBeforeMount
 * 3.onMounted
 *
 * 更新
 * 4.onBeforeUpdate
 * 5.onUpdated
 *
 * 卸载
 * 6.onBeforeUnmount
 * 7.onUnmounted
 */
import { onMounted } from "vue";
onMounted(() => {
  console.log("子组件挂载完成");
});
</script>

<style scoped></style>
